package main
import "fmt"
func main(){
	var a = 3.99
	var b = 1
	
	fmt.Printf("a type is : %T\n",a)
	fmt.Printf("b type is : %T\n",b)
	
	b = int(a)	//将float64转为int，将会直接取整
	fmt.Println(a)
	fmt.Println(b)
	
	//a = b //这里不能使用a = b，否则会报错
	/*cannot use b (type int) as type float64 in assignment*/
	
	a = float64(b)	//将int转为float64
	fmt.Println(a)
	fmt.Println(b)
}

/*GO语言的类型转换，  数据类型(数值) */
